﻿using System;
using System.Collections.Generic;
using System.Text;
using Animals.Model;
using Dogs.Business;

namespace Dogs.Business
{
    public static class AnimalsHolder
    {
        private static List<Animal> _animals;
        private static int _size;

        static AnimalsHolder()
        {
            _animals = Serializator.GetAllAnimals();
            if (_animals != null)
            {
                _size = _animals.Count;
            }
            else
            {
                _animals = new List<Animal>();
                _size = 0;
            }
        }

        internal static List<Animal> Animals
        {
            get { return AnimalsHolder._animals; }
            set { AnimalsHolder._animals = value; }
        }

        public static int Size
        {
            get { return AnimalsHolder._size; }
            set { AnimalsHolder._size = value; }
        }

    }
}
